home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 342_01.zip / DIOFNC01.C < prev    next >
C/C++ Source or Header  |  1993-04-03  |  1KB  |  46 lines

  1. /*-
  2.  *  ----------------------------------------------------------------------
  3.  *  File        :   DIOFNC01.C
  4.  *  Creator     :   Blake Miller
  5.  *  Version     :   01.01.00        February 1991
  6.  *  Language    :   Microsoft C     Version 5.1
  7.  *  Purpose     :   Intel 8255 Compatible Digital IO Functions
  8.  *                  Data Area Initialization Function
  9.  *  ----------------------------------------------------------------------
  10.  *  Revision History:
  11.  *  022891 BVM  :   Change int to short.
  12.  *  070490 BVM  :   Creation
  13.  *  ----------------------------------------------------------------------
  14.  */
  15.  
  16. #define     DIOFNC01_C_DEFINED  1
  17. #include    "DIOLIB.H"
  18. #undef      DIOFNC01_C_DEFINED
  19.  
  20. void dio_init (DIODAT *, short);
  21.  
  22. /*- DIO : Initialize Data Space --------------**
  23.  *  Initialize the structure data to 'safe' values.
  24.  *  Passed:
  25.  *      pointer :   DIODAT
  26.  *      short   :   base address
  27.  *  Returns:
  28.  *      nothing
  29.  */
  30. void dio_init (DIODAT *data, short address)
  31.     {
  32.     short   i;
  33.  
  34.     data->stat = DIO_ST_OK;
  35.     data->base = address;
  36.     data->mode = 0;
  37.     for ( i = 0; i < DIO_MAXCH; i++ )
  38.         data->pdat[i] = (unsigned char)0;
  39.     }
  40.  
  41. /*-
  42.  *  ----------------------------------------------------------------------
  43.  *  END DIOFNC01.C Source File
  44.  *  ----------------------------------------------------------------------
  45.  */
  46.